<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$id = get_input('guid');
$comment_text = get_input('comment');
$user_id = get_loggedin_userid();

if(add_drawing_comment($id, $user_id, $comment_text)) {
    echo json_encode(export_result(200, "1"));
} else {
    echo json_encode(export_result(400, "0"));
}
?>
